package backend.search.controller;

import java.util.List;

import backend.search.manager.BlockSearchManager;

import com.opensymphony.xwork2.ActionSupport;

import core.cms.model.Block;

public class BlockSearchAction extends ActionSupport
{
	private static final long serialVersionUID = 14343L;
	private BlockSearchManager searchManager ;
	private String searchkey ;
	private List<Block> blocks ;
		
	public BlockSearchAction()
	{
		searchManager =  new BlockSearchManager();
	}
	public String execute() 
	{
		this.searchkey = this.getSearchkey();
		this.blocks = searchManager.getSimpleSearchResult(this.searchkey);
		return SUCCESS ;
	}
	public String getSearchkey() {
		return searchkey;
	}
	
	public void setSearchkey(String searchkey) {
		this.searchkey = searchkey;
	}
	public List<Block> getBlocks() {
		return blocks;
	}
	public void setBlocks(List<Block> blocks) {
		this.blocks = blocks;
	}
}
